﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<DHAA.Areas.Administrator.Models.AdminModels>>" %>
 <h3>Administrators</h3>
    <style type="text/css">
        .style1
        {
            width: 50px;
        }
        .tablecen
        {
            text-align: center;
        }
        .style2
        {
            text-align: center;
        }
        .style3
        {
            width: 50px;
            text-align: center;
        }
    </style>
    <table style="width: 100%" class="list">
        <tr class="tablecen">
            <th class="style3">
                ID
            </th>
            <th class="style2">
                Username
            </th>
            <th class="style2">
                Admin's Name
            </th>
            <th class="style2">
                Actions
            </th>
        </tr>

    <% foreach (var item in Model.ToList()) { %>
    
        <tr>
            <td class="tablecen style1">
                <%= Html.Encode(item.AdminID) %>
            </td>
            <td>
                <%= Html.Encode(item.Username) %>
            </td>
            <td>
                <%= Html.Encode(item.AdminName) %>
            </td>
             <td>
                <%= Html.ActionLink("Edit", "Edit", new { id = item.AdminID }, new { @class = "ModalAction" })%> |
                <%= Html.ActionLink("Delete", "Delete", new { id = item.AdminID }, new { @class = "ModalAction"})%>
             </td>
        </tr>
    
    <% } %>

    </table>
<div class="cleared-top-5"></div>
    <div>
        <a href="<%= Url.Action("Create") %>" class="ModalAction"><button name="Create New"><img src="<%= ResolveUrl("~/Content/images/contacts-user-add.png") %>" class="inlineIcon" /> Create New</button></a>
    </div>
    <div class="cleared"></div>


